import React, {Component} from "react";
import { ReactDOM } from "react";

export default class StateControl extends Component {
    state = {
        count: 10
    }

    change = (e) =>{
        this.setState({
            count: e.target.value
        })
    }

    render() {
        return (
            <div>
                <input type="text" value={this.state.count} onChange={this.change}/>

                <div>{this.state.count}</div>
            </div>
        )
    }
}